let UsernameList = [];

module.exports = {
    GetUserNameList(){
        return UsernameList;
    },
    DeleteUserNameList(socketid) {
        if(socketid){
            UsernameList.find((x,index)=>{
                if(x.id === socketid){
                    UsernameList.splice(index, 1);
                    return true;
                }
            return false;
            });
        }
    },
    SetUserNameList(ul){
        if(ul && ul instanceof Array){
            UsernameList = ul;
            return true; 
        }
        return false;
    }

}